#load()：读取指定的序列化数据文件，并返回Python 对象

import pickle

test_list = ["pingguo", {1, 2, 3}, None]

p1 = pickle.dumps(test_list)
p2 = pickle.loads(p1)

if __name__ == "__main__":
    print(p1)
    print("返回类型：", type(p1))


    print(p2)
    print("返回类型：", type(p2))


    with open("test_pickle.txt", "rb") as f:
        # 将二进制文件对象转换成 Python 对象 p3
        p3 = pickle.load(f)
        print(p3)
        print("类型：", type(p3))
